from flask_restful import Resource
from controllers.mini_app import api
from services.robot.robot_remote_service import RobotRemoteService
class RobotOnlineApi(Resource):
    @staticmethod
    def get(robot_id:str):
        is_online,data = RobotRemoteService.is_online(robot_id)
        return {
            "is_online": is_online,
            "data": data
        }
api.add_resource(RobotOnlineApi, "/robots/<string:robot_id>/online")